home *** CD-ROM | disk | FTP | other *** search
/ Executor 2.0 / executorv2.0.iso / mac / demoware / Asymptote 1.1 Demo / Scripts / Demos / 14) Gaussian Fit / GetParameters < prev    next >
Encoding:
Text File  |  1994-11-01  |  572 b   |  28 lines  |  [TEXT/DWat]

  1. % Get parameter guesses for two Gaussians 
  2. % using the graph cursor
  3.  
  4. hide
  5. fullscreen true
  6.  
  7. set response yes
  8. ask response OK " " Click the cursor on the PEAK of GAUSSIAN #1
  9. moveto ?
  10. set a0 x
  11. set a2 y
  12. ask response OK " " Click HALF WAY DOWN THE SIDE of GAUSSIAN #1
  13. moveto ?
  14. set a1 x a0 - abs 
  15. set a1 a1 2 ln sqrt /
  16.  
  17. ask response OK " " Click the cursor on the PEAK of GAUSSIAN #2
  18. moveto ?
  19. set a3 x
  20. set a5 y
  21. ask response OK " " Click HALF WAY DOWN THE SIDE of GAUSSIAN #2
  22. moveto ?
  23. set a4 x a3 - abs 
  24.  
  25. % Convert Half Width at Half Max to 1/e width
  26. set a4 a4 2 ln sqrt /
  27.  
  28. close